package cn.edu.gingkoc.simpleems.model;

/**
 * 员工模型类
 * ...
 */
public class Employee {
    private int id;
    private String name;
    private String sex;
    private int age;
    private int salary;

    public int getId() {
        return id;
    }


    public String getName() {
        return name;
    }

    public String getSex() {
        return sex;
    }

    public int getAge() {
        return age;
    }

    public int getSalary() {
        return salary;
    }

    /**
     * Employee构造函数
     * ...
     *
     * @param id     工号
     * @param name   姓名
     * @param sex    性别
     * @param age    年龄
     * @param salary 工资
     */
    public Employee(final int id, final String name, final String sex, final int age, final int salary) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.salary = salary;
    }

    /**
     * 基于字段内容生成字符串
     * ...
     *
     * @return
     */
    @Override
    public String toString() {
        return String.format("%s      %s      %s      %s      %s\n",
                this.id,
                this.name,
                this.sex,
                this.age,
                this.salary);
    }
}
